package com.pie4cloud.pie.job.biz.enums;


import com.pie4cloud.pie.job.biz.constant.HandleConstant;

/**
 * @program: sod
 * @description:
 * @author: zzj
 * @create: 2019-12-27 16:44
 **/
public enum ExecuteEnum {
    BACKUP(HandleConstant.DISPENSE,"executeDispenseService"),
    JOB(HandleConstant.JOB,"executeJobService"),
    GATHER(HandleConstant.GATHER,"gatherService"),
	DMZ(HandleConstant.DMZ,"executeDmzService"),
	PLAYBILL(HandleConstant.PLAYBILL,"executePlayBillService");


    private String name;
    private String service;
    ExecuteEnum(String name, String service) {
        this.name = name;
        this.service = service;
    }

    public static String getService(String name){

        if (name != null) {
            for (ExecuteEnum item : ExecuteEnum.values()) {
                if (item.name.equals(name)) {
                    return item.service;
                }
            }
        }
        return null;
    }
}

